<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
    <head>
    	<meta charset="utf-8">
		<meta name="keywords" content="" />
		<meta name="description" content="" />
		<meta content="width=device-width, minimum-scale=1,initial-scale=1, maximum-scale=1, user-scalable=1" id="viewport" name="viewport" />
		<meta content="yes" name="apple-mobile-web-app-capable" />
		<meta content="black" name="apple-mobile-web-app-status-bar-style" />
		<meta content="telephone=no" name="format-detection" />
		<link type="text/css" rel="stylesheet" href="../../template/css/com/com.css"/>
		<link type="text/css" rel="stylesheet" href="../../template/css/list/style.css"/>
		<script src="../../template/js/jquery.js"></script>
		<script src="../../template/js/com/com.js"></script>
		<script src="../../template/js/com/template.js"></script>
		<script src="../../resource/my.js"></script>
		<script src="../../script/api.js"></script>
		<script type="text/javascript" src="../../script/constants.js"></script>
        <link rel="stylesheet" href="../../resource/weuimin.css" />
	    <link rel="stylesheet" href="../../resource/jinsuistyle.css" />
        <style type="text/css">

        	.weui-grid{width:50%;}
        	.weui-grid-main{text-align: center;}
        	.weui-grid__icon{width:70px;height:70px;}
        	.weui-grid-main1{
	        	height: 100px;
	        	line-height:100px;
	        	text-align: center;
	        	font-size:16px;
	        	font-weight:bold;
	        	color:#f7f6f6;
	        	background: #FFFFFF url('../../resource/images/main_bg.png') no-repeat 36px 0px ;
        	}
        	.weui-grid-label{
        	height: 100px;
        	line-height:100px;
        	font-size:16px;
        	font-weight:bold;
        	color:#FFFFA9;
        	text-align: center;
        	text-shadow: #171616 0 1px 0;
        	background: #FFFFFF url('../../resource/images/menu_bg.png') no-repeat 50% 0px ;}
        	.weui-grid-label{width:100px;margin: 0 auto;}
        	.isnew{background: #FFFFFF url('../../template/images/xp4.png') no-repeat 100% 0px ;}
        	.weui-tabbar:before{border-top-width:0px;}
        	.weui-tabbar{background:none;position: relative !important;}
			.com-content-area{padding:0px;}
        </style>
        <!-- <script language="javascript" src="http://count26.51yes.com/click.aspx?id=268836397&logo=12" charset="gb2312"></script> -->
        <script type="text/javascript">
          window.apiready = function() {
           var YHDJ = $api.getStorage("YHDJ");
            if(YHDJ == "undefined" || typeof(YHDJ) == "undefined"){
              YHDJ = "平台会员";
            }
          
             $("#jstitle").text("职场生活("+YHDJ+")");

            if(api.systemType == "ios"){
			   document.getElementById("statusBar").style.background = "#298cb4";
			}
            $api.fixStatusBar( $api.dom('header') );
            var header = $api.byId('jsheader');
            if(api.systemType=='ios'){
        			$api.fixIos7Bar(header);
        		}
        	var uiId;
	        var UILoading = api.require('UILoading');
			UILoading.flower({
			    center: {
			        x: api.winWidth/2.0,          
			        y: api.winHeight/2.0 
			    },
			    size: 30,
			    mask: "rgba(0,0,0,0.5)",
			    fixed: true
			}, function(ret) {
			    uiId = ret.id;
			});
            api.ajax({
	            url:url.zcflurl+'?dm=5'
            },function(ret,err){
            	UILoading.closeFlower({
				    id: uiId
				});
            	var data = eval("("+ret.json+")");
            	var html = "<ul>";
            	
            	for(var i = data.length-1;i>=0;i--){
            	//console.info("===> " + JSON.stringify(data[i]));
            	   html += "<li><img src=\"http://mobile-1255508964.file.myqcloud.com/app/icon/"+data[i].ddm+"t.png\"/>&nbsp;"
					+"<img src=\"http://mobile-1255508964.file.myqcloud.com/app/icon/"+data[i].ddm+".png\" style=\"width:90%\" onclick=\"menu('"+data[i].ddm+"','"+ data[i].dmc + "')\"/>"
				    +"</li>"
            	}
            	html += "<div style=\"height:25px;\"></div><div style=\"height:2px;background:#6b92c2;width:90%;margin: 0 auto;\"></div>"
            	     +"<div style=\"height:3px;\"></div><div style=\"height:2px;background:#6b92c2;width:90%;margin: 0 auto;\"></div>";
            	html += "<li style=\"margin-top: 30px;\"><img src=\"../../image/51t.png\"/>&nbsp;"
					+"<img src=\"../../image/nf.png\" style=\"width:90%\" onclick=\"milk()\"/>"
				    +"</li>";
            	html += "</ul>";
            	document.getElementById("js-com-content-area").innerHTML = html;
            });
        }
            
            function milk(){
//              api.openWin({
//				    name: 'milk',
//				    url: 'http://119.28.176.231/base/preuser!doNotNeedSessionAndSecurity_oneLogin.sy?type=2&uid=15680030061',
//				});
                api.openWin({
				    name: 'menu',
				    url: './menu.html',
				    pageParam: {
				        dm: '1',
				        mc: '进口商品'
				    }
				});
            }
        
        
	        function menu(dm,mc){
	        	SetCookie(dm,dm);
	        	api.openWin({
				    name: 'menu',
				    url: './menu.html',
				    pageParam: {
				        dm: dm,
				        mc: mc
				    }
				});
	        }
			function setClick(e,dm){
				var note = e.parentNode.parentNode;
				if(getCookie(dm) != null){	//已经点击过的新品不要提示图标
					note.setAttribute("class","weui-grid");
 				}
			}
			
			function goHistory(){
			var jp = $api.getStorage("LOGIN_FLAG");
				if(jp==null||jp==''||typeof(jp)==undefined||jp=='undefined'){
					api.alert({
						msg:'请登录'
			        },function(ret,err){
			        	api.openWin({
				            name: '跳转登陆',
				            url: '../login.html'
				            //url:'html/jskp/jskp.html'
			            });
			        });
				}else{
					api.openWin({
					    name: 'history.html',
					    url: 'history.html'
					    //url:'html/jskp/jskp.html'
					});
				}
			}
			
			function goBill(){
			var jp = $api.getStorage("LOGIN_FLAG");
				if(jp==null||jp==''||typeof(jp)==undefined||jp=='undefined'){
					api.alert({
						msg:'请登录'
			        },function(ret,err){
			        	api.openWin({
				            name: '跳转登陆',
				            url: '../login.html'
				            //url:'html/jskp/jskp.html'
			            });
			        });
				}else{
					api.openWin({
					    name: 'bill.html',
					    url: 'bill.html',
					    
					    //url:'html/jskp/jskp.html'
					});
				}
			}
	        </script>
    </head>
    <body>
    <header id="statusBar">
      <div id="jsheader">
          <nav id="jsnav">
              <a id="jsleft" tapmode="" onclick="api.closeWin();">
                  <span>主页</span>
              </a>
              <div id="jsmiddle">
                  <strong id="jstitle">职场生活</strong>
              </div>
              <a id="jsright">
                <span></span>
              </a>
          </nav>
      </div>
      </header>
	<div class="com-content">

		<div class="com-header-area" id="js-com-header-area">
			<!-- <a href="" class="com-header-logo"
				style="width:100%;color:#FFFFFF;text-align:center;font-size:20px;">职场生活</a> -->
				<img src="../../image/tb.png" style="width:100%;"/>
				<ul class="menu_ul">
					<a href="main2.html" class="selected"><li>首  页</li></a>
					<a onclick="goHistory();"><li>历 史 订 单</li></a>
					<a onclick="goBill();"><li>购 物 筐</li></a>
				</ul>
			<dfn></dfn>
			<div class="clear"></div>
		</div>
		<div class="com-content-area all_bg" id="js-com-content-area" style="min-height:68%;padding-top:10px;">
	
		</div>
		<div id="loadingToast" style="display:none;">
			<div class="weui-mask_transparent"></div>
			<div class="weui-toast">
				<i class="weui-loading weui-icon_toast"></i>
				<p class="weui-toast__content">数据加载中...</p>
			</div>
		</div>
		
		<!-- 公共底部，必须引用 -->
		<div class="weui-tabbar">
			<div class="com-footer-area footer" id="js-com-footer" style="width:100%;">
				<img src="../../image/db.png" style="width:100%;"/>
			</div>
		</div>
	</div>
</body>

</html>
